package com.tedu._04mybatys.mapper;

import com.tedu._04mybatys.pojo.*;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface WeiboMapper {
    /*@Insert("INSERT INTO weibo(content,created,user_id) " +
            "VALUES (#{content},#{created},#{userId})")*/
    public int insert(Weibo weibo);
    //@Delete("DELETE FROM weibo WHERE id=#{id}")
    public int deleteById(int id);
    /*@Update("UPDATE weibo SET content=#{content},created=#{created},user_id=#{userId} " +
            "WHERE id=#{id}")*/
    int uodateById(Weibo weibo);
    //@Select("SELECT content,created FROM weibo")
    List<?> selectAllWeiboVO1();

    //@Select("SELECT content,user_id userId FROM weibo WHERE id=#{id}")
    WeiboVO2 selectWeiboVo2ById(Integer id);


    int dynamicUpdateWeibo(Weibo weibo);
    int dynamicDeleteByIds(Integer[] ids);
    int dynamicDeleteByIds2(List<Integer> list);

    WeiboVO3 selectResultMap(Integer id);
    WeiboVO4 selectWeiboAndComment(Integer id);
    int countWeibo();
















}
